# -*- coding: utf-8 -*-
import matplotlib.pyplot as plt

def show_Keras_fit_result(result):
    # plot the result

    plt.figure
    plt.plot(result.epoch, result.history['acc'], label="acc")
    plt.plot(result.epoch, result.history['val_acc'], label="val_acc")
    plt.scatter(result.epoch, result.history['acc'], marker='*')
    plt.scatter(result.epoch, result.history['val_acc'])
    plt.legend(loc='upper right')
    plt.show()

    plt.figure
    plt.plot(result.epoch, result.history['loss'], label="loss")
    plt.plot(result.epoch, result.history['val_loss'], label="val_loss")
    plt.scatter(result.epoch, result.history['loss'], marker='*')
    plt.scatter(result.epoch, result.history['val_loss'], marker='*')
    plt.legend(loc='upper right')
    plt.show()


if __name__ == "__main__":
    # for exmple
    # result = model.fit()
    # show_Keras_fit_result(result)
    pass